<?php
namespace BP\Sys;

use BP\En\EntityNoName;

require_once("BP/En/Map.php");
class ExcelSheet extends EntityNoName {
	public function getFK_ExcelFile () 
	{
		return $this->GetValStrByKey(ExcelSheetAttr::$FK_ExcelFile);
	}
	public function setFK_ExcelFile ($value) // [String value]
	{
		$this->SetValByKey(ExcelSheetAttr::$FK_ExcelFile, $value);
	}
	public function getSheetIndex () 
	{
		return $this->GetValIntByKey(ExcelSheetAttr::$SheetIndex);
	}
	public function setSheetIndex ($value) // [int value]
	{
		$this->SetValByKey(ExcelSheetAttr::$SheetIndex, $value);
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public function getHisUAC () 
	{
		$uac = new UAC();
		$uac->OpenAll();
		return $uac;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Sys_ExcelSheet");
		$map->setEnDesc("ExcelSheet");
		$map->AddTBStringPK(ExcelSheetAttr::$No, NULL, "No",  TRUE ,  TRUE , 1, 36, 200);
		$map->AddTBString(ExcelSheetAttr::$Name, NULL, "Sheet名称",  TRUE ,  FALSE , 1, 50, 100);
		$map->AddDDLEntities(ExcelSheetAttr::$FK_ExcelFile, NULL, "Excel模板", ExcelFiles::constructor__(),  TRUE );
		$map->AddTBInt(ExcelSheetAttr::$SheetIndex, 0, "Sheet索引",  TRUE ,  FALSE );
		$this->set_enMap($map);
		return $this->get_enMap();
	}
	protected function beforeInsert () 
	{
		$this->setNo($UUID->randomUUID());
		return parent->beforeInsert();
	}
}
?>
